package EighteenStudy;

import java.util.Scanner;

/**
 * User:langcehen
 * Date:2022-08-15
 * Time:19:42
 */
public class demo4 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        int count = 0;
        for (int i = 0; i < str.length(); i++) {
            if(str.charAt(i) == 6){
                count++;
            }
            if(str.charAt(i) == 6){
                String s2 = str.substring(i,i+9);
                for (int j = 0; j < s2.length(); j++) {
                    int num2 = 0;
                    num2+=s2.charAt(j);
                    if(num2 == 54){
                        System.out.println(str.replace(s2,"27"));
                    }
                }
            }
        }
    }
}
